﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FineUI;

namespace lcmyjobs.Web.reward
{
    public partial class offer_user : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
               this.Title = string.Format("揭榜悬赏求职   人才网   招聘网   求职网   猎头网      {0}", Application["webname"].ToString());
                if (Request.QueryString["bh"] != null)
                    this.Label1.Text = Request.QueryString["bh"].ToString();
                else
                    Response.Redirect("userlist.html");

            }

        }

        protected void btnOK_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                string rbh = this.Label1.Text;
                string job = this.txtjob.Text;
                string payid = ddlsalarym.SelectedItem.Text;// int.Parse(this.txtpayid.Text);
                string unit = this.txtunit.Text;
                string offername = this.txttruename.Text;
                string offerID = this.txtofferID.Text;
                string phone = this.txtphone.Text;
                string email = this.txtemail.Text;
                bool ismy = this.chkismy.Checked;
                lcmyjobs.Model.offer_user model = new lcmyjobs.Model.offer_user();
                model.rbh = rbh;
                model.job = job;
                model.payid = payid;
                model.unit = unit;
                model.offername = offername;
                model.offerID = offerID;
                model.phone = phone;
                model.email = email;
                model.ismy = ismy;
                lcmyjobs.BLL.offer_user bll = new lcmyjobs.BLL.offer_user();
                int i=bll.Add(model);
                if(i>0)
                    Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功！","userlist.html");
                if(i==-1)
                    Maticsoft.Common.MessageBox.ShowAndRedirect(this, "您已申请过此人的悬赏！", "userlist.html");

            }

        }

        protected void whatishunter(object sender, EventArgs e)
        {

            //Alert alert = new Alert();
            string msg = "<div style='width:250px;text-indent:2em;line-height:20px;'><p style='padding-Bottom:5px; >  所谓猎手就是指悬赏求职/招聘揭榜的人。</p>";

            msg += "<p style='padding-Bottom:5px; >  为求职者提供所需要的岗位信息，落实求职者的工作岗位，必要时给求职者进行面试指导，把合适岗位推荐给人才，并从“我就业网”获得一定劳动报酬的专业或非专业人士。 </p>";
            msg += "<p style='padding-Bottom:5px; >  为企业提供所需要的人才信息，落实企业招聘岗位，把合适人才推荐给企业，并从“我就业网”获得一定劳动报酬的专业或非专业人士。</p></div>";

            /*
            alert.Message = msg;
            alert.Title = "什么是猎手？";
            
            alert.Icon = Icon.Help;

            alert.Show();
             */
            Alert.Show(msg);
        }
    }
}